package com.newsmanagement.domain.pojo;

import java.util.Date;
import lombok.Data;

/**
 * 节点企业信息表
 * @TableName node_info
 */
@Data
public class NodeInfo {
    /**
     * 节点企业编号
     */
    private Integer nodeId;

    /**
     * 登录编码
     */
    private String code;

    /**
     * 登录密码
     */
    private String password;

    /**
     * 节点企业名称
     */
    private String name;

    /**
     * 节点类型：1：养殖企业；2：屠宰企业；3：批发商；4：零售商；
     */
    private Integer type;

    /**
     * 所在省编号
     */
    private Integer provId;

    /**
     * 所在省名称
     */
    private String provName;

    /**
     * 所在市编号
     */
    private Integer cityId;

    /**
     * 所在市名称
     */
    private String cityName;

    /**
     * 节点企业地址
     */
    private String address;

    /**
     * 营业执照代码（所有节点必填）
     */
    private String businessId;

    /**
     * 动物防疫条件合格证编号（养殖节点必填）
     */
    private String epId;

    /**
     * 环境影响评价资质证书编号（养殖、屠宰节点必填）
     */
    private String eiaId;

    /**
     * 食品流通许可证编号（批发商必填）
     */
    private String cirId;

    /**
     * 食品经营许可证编号（批发商、零售商必填）
     */
    private String fbId;

    /**
     * 法定代表人
     */
    private String corporation;

    /**
     * 联系电话
     */
    private String telephone;

    /**
     * 注册日期
     */
    private Date regDate;

    /**
     * 备注
     */
    private String remarks;

    // 添加必要的 getter 方法
    public Integer getNodeId() {
        return nodeId;
    }

    public void setNodeId(Integer nodeId) {
        this.nodeId = nodeId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    // 其他 getter/setter 方法...

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        NodeInfo other = (NodeInfo) that;
        return (this.getNodeId() == null ? other.getNodeId() == null : this.getNodeId().equals(other.getNodeId()))
                && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
                && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
                && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
                && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
                && (this.getProvId() == null ? other.getProvId() == null : this.getProvId().equals(other.getProvId()))
                && (this.getProvName() == null ? other.getProvName() == null : this.getProvName().equals(other.getProvName()))
                && (this.getCityId() == null ? other.getCityId() == null : this.getCityId().equals(other.getCityId()))
                && (this.getCityName() == null ? other.getCityName() == null : this.getCityName().equals(other.getCityName()))
                && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
                && (this.getBusinessId() == null ? other.getBusinessId() == null : this.getBusinessId().equals(other.getBusinessId()))
                && (this.getEpId() == null ? other.getEpId() == null : this.getEpId().equals(other.getEpId()))
                && (this.getEiaId() == null ? other.getEiaId() == null : this.getEiaId().equals(other.getEiaId()))
                && (this.getCirId() == null ? other.getCirId() == null : this.getCirId().equals(other.getCirId()))
                && (this.getFbId() == null ? other.getFbId() == null : this.getFbId().equals(other.getFbId()))
                && (this.getCorporation() == null ? other.getCorporation() == null : this.getCorporation().equals(other.getCorporation()))
                && (this.getTelephone() == null ? other.getTelephone() == null : this.getTelephone().equals(other.getTelephone()))
                && (this.getRegDate() == null ? other.getRegDate() == null : this.getRegDate().equals(other.getRegDate()))
                && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getNodeId() == null) ? 0 : getNodeId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getProvId() == null) ? 0 : getProvId().hashCode());
        result = prime * result + ((getProvName() == null) ? 0 : getProvName().hashCode());
        result = prime * result + ((getCityId() == null) ? 0 : getCityId().hashCode());
        result = prime * result + ((getCityName() == null) ? 0 : getCityName().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getBusinessId() == null) ? 0 : getBusinessId().hashCode());
        result = prime * result + ((getEpId() == null) ? 0 : getEpId().hashCode());
        result = prime * result + ((getEiaId() == null) ? 0 : getEiaId().hashCode());
        result = prime * result + ((getCirId() == null) ? 0 : getCirId().hashCode());
        result = prime * result + ((getFbId() == null) ? 0 : getFbId().hashCode());
        result = prime * result + ((getCorporation() == null) ? 0 : getCorporation().hashCode());
        result = prime * result + ((getTelephone() == null) ? 0 : getTelephone().hashCode());
        result = prime * result + ((getRegDate() == null) ? 0 : getRegDate().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", nodeId=").append(nodeId);
        sb.append(", code=").append(code);
        sb.append(", password=").append(password);
        sb.append(", name=").append(name);
        sb.append(", type=").append(type);
        sb.append(", provId=").append(provId);
        sb.append(", provName=").append(provName);
        sb.append(", cityId=").append(cityId);
        sb.append(", cityName=").append(cityName);
        sb.append(", address=").append(address);
        sb.append(", businessId=").append(businessId);
        sb.append(", epId=").append(epId);
        sb.append(", eiaId=").append(eiaId);
        sb.append(", cirId=").append(cirId);
        sb.append(", fbId=").append(fbId);
        sb.append(", corporation=").append(corporation);
        sb.append(", telephone=").append(telephone);
        sb.append(", regDate=").append(regDate);
        sb.append(", remarks=").append(remarks);
        sb.append("]");
        return sb.toString();
    }
}